home *** CD-ROM | disk | FTP | other *** search
/ Wonky Flux Batch 2019 02 / Wonky_Flux_Batch_2019-02.zip / Wonky Flux Batch 2019-02 / 071 - EXFER 4.1 4.2.dsk / EXFER4.0 / ÅØÆÅÒ®ÓÙÓ®Ó < prev    next >
Text File  |  2019-02-17  |  15KB  |  544 lines

  1. ; ****************************
  2. ;
  3. ;            EXfer:
  4. ; The Extended Transfer Module
  5. ;
  6. ;  This program is for use on
  7. ;  the ProDOS version of GBBS
  8. ;  "Pro" 1.2 and "Pro" 1.3.
  9. ;
  10. ; Written by: Mike Golaszewski
  11. ; (C)1986, All Rights Reserved
  12. ;
  13. ; ****************************
  14.  
  15. ; THIS IS NOT FREEWARE
  16.  
  17. ; system segment, version 4.0
  18.  
  19. ; created 08/23/86 - modified 05/30/87
  20.  
  21. ; Special thanks to Mark Roberts for providing much of the ideas and concepts
  22. ; found in EXfer, and for vigorously testing the program; Jerry Cline for his
  23. ; ideas and suggestions; Kieth Christian for his support; Lance Taylor-Warren
  24. ; for providing GBBS 1.3 information; and especially Greg Schaefer ("Gee Ess")
  25. ; for providing the Ymodem drivers.
  26.  
  27. ; define link in labels
  28.  
  29.  public add
  30.  public create
  31.  public external
  32.  public sort
  33.  
  34. ; external commands
  35. ; ~~~~~~~~~~~~~~~~~
  36.  
  37. ; get & parse command string
  38.  
  39. external
  40.  on nocar goto terminate
  41.  input @2 "External: " i$
  42.  a=instr(" ",i$):if a=0 goto ret
  43.  x$=left$(i$,a-1):b=instr(",",i$)
  44.  if not(b) then y$=mid$(i$,a+1):z$="":goto ext.1
  45.  y$=mid$(i$,a+1,b-1):z$=mid$(i$,b+1)
  46.  
  47. ext.1
  48.  if x$="D" or x$="DUMP" goto dump
  49.  if x$="H" or x$="HELP" goto hedit
  50.  if x$="S" or x$="SWAP" goto swap
  51.  if x$="P" or x$="PURGE" goto purge
  52.  if x$="R" or x$="RESET" goto reset
  53.  print \"XT:"chr$(7)" Command not recognized":goto ret
  54.  
  55. ; :::::::::::::::::::::::::::::::::::::
  56. ; external command functions begin here
  57. ; :::::::::::::::::::::::::::::::::::::
  58.  
  59. ; swap two libraries
  60. ; ~~~~~~~~~~~~~~~~~~
  61.  
  62. swap
  63.  b=val(y$):c=val(z$)
  64.  if (b<1 or b>255) or (c<1 or c>255) or (b=c) goto ret
  65.  
  66. ; commence swapping
  67.  
  68.  i$="R a1:XV."+str$(b)+",a1:X.TEMP"
  69.  use "a:xdos",i$:i$="R a1:XV."+str$(c)+",a1:XV."+str$(b)
  70.  use "a:xdos",i$:i$="R a1:X.TEMP,a1:XV."+str$(c)
  71.  use "a:xdos",i$:i$="R a1:DV."+str$(b)+",a1:X.TEMP"
  72.  use "a:xdos",i$:i$="R a1:DV."+str$(c)+",a1:DV."+str$(b)
  73.  use "a:xdos",i$:i$="R a1:X.TEMP,a1:DV."+str$(c)
  74.  use "a:xdos",i$
  75.  
  76. ; update the bit map
  77.  
  78.  open #1,"a1:xt.bitmap":read #1,ed+1,255:close
  79.  x=peek(ed+b):y=peek(ed+c):poke ed+b,y:poke ed+c,x
  80.  open #1,"a1:xt.bitmap":write #1,ed+1,255:close
  81.  
  82. ; switch names in volume file
  83.  
  84.  open #1,"a1:xt.volumes":position #1,32,b
  85.  input #1,x$:position #1,32,c:input #1,y$
  86.  position #1,32,b:print #1,y$:position #1,32,c
  87.  print #1,x$:close:print \"XT: Libraries swapped..."
  88.  push ret:goto log
  89.  
  90. ; edit entry in the help file
  91. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  92.  
  93. hedit
  94.  x=instr(y$,"CDFHIKLMNRSTVX?B"):if not(x) goto ret
  95.  ready "a1:hlp.exfer":input #msg(x),a,x$:input #6,x$
  96.  edit(0):copy #6,#8:print '
  97. Edit help message: 'edit(3)' cols, [4K] max
  98. [DONE] when finished, [.H] for help'
  99.  edit(1):if not(edit(2)) goto ret
  100.  print \"XT: Enter command line [ie: D)irectory]"
  101.  input @3 "  :>" i$:if i$="" goto ret:else kill #msg(x)
  102.  print #msg(x),x,y$:print #6,i$:copy #8,#6:msg(x)=1
  103.  update:ready d2$:goto ret
  104.  
  105. ; purge files from a directory
  106. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  107.  
  108. purge
  109.  x=val(y$):ob=bb:bb=x:gosub log:if bf$="" then bb=ob:push ret:goto log
  110.  print \"XT: ["bn$"]"\:input @2 "XT: Purge this volume ? " i$
  111.  i$=left$(i$,1):if i$<>"Y" then bb=ob:push ret:goto log
  112.  input @0 \"XT: Remove files from disk ? " z$
  113.  open #1,d1$:print \"XT: "byte(4)" entries; purging #002";
  114.  for l=1 to byte(4):print chr$(8,3);right$("00"+str$(l),3);
  115.  position #1,32,l+1:input #1,i$:if i$="" next:goto purge.1
  116.  if z$="Y" gosub name:f$=bf$+f$:kill f$
  117.  position #1,32,l+1:print #1,chr$(13):next
  118.  
  119. purge.1
  120.  close:print chr$(8,3)"---":byte(4)=2:open #1,d1$
  121.  print #1,bn$:print #1,bf$:write #1,ram2,7:close
  122.  kill d2$:print '
  123. XT: Creating new description file...':gosub make.msg
  124.  bb=ob:push ret:goto log
  125.  
  126. ; erase trashed file information
  127. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  128.  
  129. reset
  130.  x=val(y$):ob=bb:bb=x:gosub log:if bf$="" then ob=bb:push ret:goto log
  131.  print \"XT: ["bn$"]"\:input @2 "XT: Reset file information ? " i$
  132.  i$=left$(i$,1):if i$<>"Y" then bb=ob:push ret:goto log
  133.  open #1,d1$:print \"XT: "byte(4)" entries; erasing #002";
  134.  for l=1 to byte(4):print chr$(8,3);right$("00"+str$(l),3);
  135.  position #1,32,l+1:input #1,i$:if i$="" next:goto reset.1
  136.  input #1,x$:read #1,ram2+7,10:byte(12)=0:position #1,32,l+1
  137.  print #1,i$:print #1,x$:write #1,ram2+7,10:next
  138.  
  139. reset.1
  140.  close:print chr$(8,3)"---":kill d2$:print '
  141. XT: Creating new description file...':gosub make.msg
  142.  bb=ob:push ret:goto log
  143.  
  144. ; send a directory to the printer
  145. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  146.  
  147. dump
  148.  x=val(y$):ob=bb:bb=x:gosub log:if bf$="" then ob=bb:push ret:goto log
  149.  y=5:gosub dir.h:use "a1:xtyp",bf$:open #1,d1$:for l=1 to byte(4)
  150.  position #1,32,l+1:input #1,i$:input #1,ty$:position #1,32,l+1,20
  151.  read #1,ram2+7,10:if i$="" goto dump.1:else na$=i$:gosub name
  152.  a$=bf$+f$:f$=na$:gosub dir.e:print #5
  153.  
  154. dump.1
  155.  next:close
  156.  
  157. ; print 
  158.  
  159.  x=peek(865)+peek(866)*256:y=peek(867)+peek(868)*256:z=x-y
  160.  print #5,\"Kbytes Free: "left$(str$(z)+chr$(32,3),4);
  161.  print #5,"     "right$("   Kbytes Used: "+str$(y),17);
  162.  print #5,"        Total Kbytes: "x:print #5,chr$(12)
  163.  bb=ob:push ret:goto log
  164.  
  165. ; :::::::::::::::::::::::::::::::::::
  166. ; external commands routines end here
  167. ; :::::::::::::::::::::::::::::::::::
  168.  
  169. ; optimize directory
  170. ; ~~~~~~~~~~~~~~~~~~
  171.  
  172. sort
  173.  on nocar goto terminate
  174.  input @2 "Sort by N)ame or T)ype ? " i$:if i$="" goto ret
  175.  print \"XT: "byte(4)" entries; sorting #002";:open #1,d1$:x=2
  176.  
  177. ; use the GS SBS algorithm
  178.  
  179. sort.1
  180.  position #1,32,x:input #1,a$:input #1,y$
  181.  position #1,32,x,20:read #1,ram2+7,10
  182.  position #1,32,x+1:input #1,b$:input #1,z$
  183.  if b$="" goto sort.3:else if a$="" goto sort.2
  184.  if (i$<>"T") and (a$<=b$) goto sort.3
  185.  if (i$="T") and (y$<=z$) goto sort.3
  186.  
  187. ; swap entries around
  188.  
  189. sort.2
  190.  position #1,32,x+1,20:read #1,ram2+20,10
  191.  position #1,32,x:print #1,b$:print #1,z$:write #1,ram2+20,10
  192.  position #1,32,x+1:print #1,a$:print #1,y$:write #1,ram2+7,10
  193.  if x>2 then x=x-1:print chr$(8,3);right$("00"+str$(x),3);
  194.  goto sort.1
  195.  
  196. sort.3
  197.  x=x+1:print chr$(8,3);right$("00"+str$(x),3);
  198.  if x<=byte(4) goto sort.1:else close:print chr$(8,3)"---"
  199.  goto ret
  200.  
  201. ; add a file to the directory
  202. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  203.  
  204. ; get filename to add
  205.  
  206. add
  207.  on nocar goto terminate
  208.  if nb=255 goto dfull
  209.  input @2 "Add: " i$:if i$="" goto ret
  210.  na$=left$(i$+chr$(32,14),15):i$=na$:gosub read
  211.  if l=0 goto add.1
  212.  
  213. ; see if existing directory entry is to be replaced
  214.  
  215.  input @2 \"XT: Replace existing entry ? " x$
  216.  if x$<>"Y" goto ret:else nb=l:d=byte(12)
  217.  
  218. ; file doesn't exist on ProDOS volume
  219.  
  220. add.1
  221.  i$=na$:gosub name:f$=bf$+f$:gosub chkfil:close
  222.  if not(a) goto add.2:else print \"XT: "f$" doesn't exist on "bf$
  223.  input @2 "    Add anyways ? " i$:if i$<>"Y" goto ret
  224.  
  225. ; compute some file info
  226.  
  227. add.2
  228.  gosub dtype:gosub size:gosub sfile:byte(7)=255:byte(12)=0
  229.  
  230. ; ask for a description
  231.  
  232.  on nocar goto add.3
  233.  if d print '
  234. XT: Do you want to change the existing
  235.     file information ? ';:else print '
  236. XT: Would you like to enter a short
  237.     description of this file ? ';
  238.  input @2 i$:i$=left$(i$,1):if i$<>"Y" goto add.3
  239.  edit(0):if d input #msg(d),a:input #6,x$\y$\z$:copy #6,#8
  240.  gosub edesc:if not(edit(2)) goto add.3
  241.  if d then byte(12)=d:kill #msg(d):update:goto add.i
  242.  a=1
  243.  
  244. add.f
  245.  if msg(a) then a=a+1:else d=a:goto add.i
  246.  if a>msg(0) then d=a:goto add.i
  247.  goto add.f
  248.  
  249. add.i
  250.  kill #msg(d):print #msg(d),un:print #6,na$
  251.  print #6,"Uploader: "a1$" "a2$" [#"un"]"
  252.  print #6,"Uploaded: "date$" "time$\:copy #8,#6
  253.  msg(d)=255:update
  254.  
  255. add.3
  256.  if d then byte(12)=d:d=0
  257.  if nb<>byte(4) goto write:else goto update
  258.  
  259. ; routine to create libraries
  260. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~
  261.  
  262. ; set defaults for new directory
  263.  
  264. create
  265.  if bf$<>"" goto create.1
  266.  bn$="New directory"+chr$(32,17):bf$="a1:  "
  267.  byte(0)=1:byte(1)=1:byte(2)=1:byte(3)=0
  268.  byte(4)=2:byte(5)=0:byte(6)=0:zz$="x"
  269.  
  270. ; print info to the screen
  271.  
  272. create.1
  273.  on nocar goto terminate
  274.  if byte(0)>byte(1) then byte(1)=byte(0)
  275.  if byte(0)>byte(2) then byte(2)=byte(0)
  276.  print \\screen$"XT: Library #"right$("00"+str$(bb),3)"..."\
  277.  print "1-Name...."bn$\"2-Drive..."bf$\
  278.  print "3-Librarian: ";:if not(b1) print "None":else print b1
  279.  print \"4-Access level: "byte(0)\"5-Upload level: "byte(2)
  280.  print "6-D/load level: "byte(1)\
  281.  print "7-Auto-validate files ? ";:if not(byte(3)) print "No"
  282.  if byte(3) print "Yes"
  283.  input @2 \"Change which [1-7] ? " i$:if i$="" goto create.2
  284.  
  285. ; change an option
  286.  
  287.  if i$="1" input @3 \"Name: " i$:bn$=left$(i$+chr$(32,29),30):goto create.1
  288.  if (i$="2") and (info(5)) input @2 \"Drive: " i$:bf$=left$(i$+chr$(32,3),4)
  289.  if i$="3" input \"Librarian's user #: " x$:b1=val(x$)
  290.  if i$="3" then byte(6)=b1/256:byte(5)=b1 mod 256:goto create.1
  291.  if i$="4" input \"Access level: " i$:byte(0)=val(i$):goto create.1
  292.  if i$="5" input \"Upload level: " i$:byte(2)=val(i$):goto create.1
  293.  if i$="6" input \"D/load level: " i$:byte(1)=val(i$):goto create.1
  294.  if i$<>"7" goto create.1
  295.  if byte(3)=0 then byte(3)=255:goto create.1
  296.  byte(3)=0:goto create.1
  297.  
  298. ; see if the directory is to be saved
  299.  
  300. create.2
  301.  input \"XT: Save this ? " i$
  302.  if i$<>"Y" bb=ob:gosub log:push ret:goto getslt
  303.  
  304. ; update the bit-map
  305.  
  306.  print \"XT: Updating volume bit-map..."
  307.  open #1,"a1:xt.bitmap":read #1,ed+1,255:close
  308.  poke ed+bb,byte(0):open #1,"a1:xt.bitmap"
  309.  write #1,ed+1,255:close:open #1,"a1:xt.volumes"
  310.  position #1,32,bb:print #1,bn$:close
  311.  
  312. ; save the stuff
  313.  
  314.  z$="a1:xv."+str$(bb):if zz$="x" create d1$
  315.  open #1,z$:print #1,bn$:print #1,bf$:write #1,ram2,7
  316.  close
  317.  
  318.  if zz$<>"x" gosub log:push ret:goto getslt
  319.  
  320. ; make a new message file for this library
  321.  
  322.  zz$="":print \"XT: Making description file..."
  323.  gosub make.msg:gosub log:push ret:goto getslt
  324.  
  325. ; return to main module
  326. ; ~~~~~~~~~~~~~~~~~~~~~
  327.  
  328. ret
  329.  link "a:exfer.seg","prompt"
  330.  
  331. ; loss of carrier
  332. ; ~~~~~~~~~~~~~~~
  333.  
  334. terminate
  335.  poke ram2,v:when$=ram+20:if v=0 then byte=ram+29:goto term.1
  336.  byte=ram+37:nibble(3)=dl/256:byte(3)=dl mod 256
  337.  nibble(4)=ul/256:byte(4)=ul mod 256
  338.  
  339. term.1
  340.  clear:recall "a1:variables":kill "a1:variables":x=peek(ram2)
  341.  if x=13 then ul=byte(4)+nibble(4)*256:dl=byte(3)+nibble(3)*256
  342.  link "a:exfer.seg","termin2"
  343.  
  344. ; ::::::::::::::::::::
  345. ; disk I/O subroutines
  346. ; ::::::::::::::::::::
  347.  
  348. ; get an empty slot
  349. ; ~~~~~~~~~~~~~~~~~
  350.  
  351. getslt
  352.  nb=0:open #1,d1$:for l=1 to byte(4)
  353.  position #1,32,l+1:input #1,i$
  354.  if (i$="") and (nb=0) then nb=l:l=byte(4)
  355.  next:close:if not(nb) then nb=byte(4)
  356.  return
  357.  
  358. ; log to a volume
  359. ; ~~~~~~~~~~~~~~~
  360.  
  361. log
  362.  byte=ram2:fill ram2,64,0:bf$="":z$="a1:xv."+str$(bb)
  363.  open #1,z$:input #1,bn$:input #1,bf$
  364.  read #1,ram2,6:close:b1=byte(5)+byte(6)*256
  365.  b2=1:if byte(0) then b2=flag(byte(0))
  366.  b3=1:if byte(1) then b3=flag(byte(1))
  367.  b4=1:if byte(2) then b4=flag(byte(2))
  368.  lb=(b1=un):if info(5) then lb=1:b2=1:b3=1:b4=1
  369.  d1$="a1:xv."+str$(bb):d2$="a1:dv."+str$(bb)
  370.  if bf$ then ready d2$:bf$=left$(bf$,instr(":",bf$))
  371.  return
  372.  
  373. ; make a description file
  374. ; ~~~~~~~~~~~~~~~~~~~~~~~
  375.  
  376. make.msg
  377.  y=256:z=256:f$="a1:dv."+str$(bb)
  378.  y=(y/128)*128:z=(z/128)*128:l=(y/32)+(z/128)
  379.  fill ram2,64,0:byte(0)=z/128:byte(1)=y/32
  380.  create f$:open #1,f$:write #1,ram2,8
  381.  fill ram2,64,0:for x=1 to l:write #1,ram2,64
  382.  write #1,ram2,64:next:close:x=6:goto type
  383.  
  384. ; update "number of entries" counter
  385. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  386.  
  387. update
  388.  byte(4)=byte(4)+1:open #1,d1$:print #1,bn$
  389.  print #1,bf$:write #1,ram2,7:close
  390.  
  391. ; write a directory entry
  392. ; ~~~~~~~~~~~~~~~~~~~~~~~
  393.  
  394. write
  395.  open #1,d1$:position #1,32,nb+1:print #1,na$
  396.  print #1,ty$:write #1,ram2+7,10:close
  397.  push ret:goto getslt
  398.  
  399. ; read a directory entry
  400. ; ~~~~~~~~~~~~~~~~~~~~~~
  401.  
  402. read
  403.  open #1,d1$:for l=1 to byte(4)
  404.  position #1,32,l+1:input #1,f$
  405.  if instr(i$,f$)=1 then p=l:l=byte(4):next:l=p:goto read.1
  406.  next:close:l=0:return
  407.  
  408. read.1
  409.  input #1,ty$:read #1,ram2+7,10:close
  410.  return
  411.  
  412. ; read a file by slot #
  413. ; ~~~~~~~~~~~~~~~~~~~~~
  414.  
  415. nread
  416.  if left$(i$,1)="#" then i$=mid$(i$,2)
  417.  l=val(i$):if (l<1) or (l>253) then l=0:return
  418.  open #1,d1$:position #1,32,l
  419.  input #1,f$:if f$="" close #1:l=0:return
  420.  input #1,ty$:read #1,ram2+7,10:close #1
  421.  i$=f$:if pt=2 return:else print \"XT: [#"l"]: "i$:return
  422.  
  423. ; show a directory header
  424. ; ~~~~~~~~~~~~~~~~~~~~~~~
  425.  
  426. dir.h
  427.  print #y,right$("00"+str$(bb),3)": "bn$;
  428.  print #y,"                        Librarian: "right$("00"+str$(b1),3)
  429.  print #y,'
  430.  #  Filename        Typ I Size Uploaded Uploader Downloaded Miscellaneous'\
  431.  return
  432.  
  433. ; display an entry
  434.  
  435. dir.e
  436.  print #y,right$("00"+str$(l+1),3)" "f$" "ty$" ";
  437.  if byte(12) print #y,"Y ";:else print #y,"N ";
  438.  x=byte(8)+byte(9)*256:print #y,right$("   "+str$(x),4)" ";
  439.  b$=when$:if (not(byte(7))) print #y,"VALIDATE";:else print #y,b$;
  440.  z=byte(16):x=byte(10)+byte(11)*256
  441.  print #y," User " right$("00"+str$(x),3);
  442.  print #y,"  "right$("00"+str$(z),3)" times "a$;
  443.  return
  444.  
  445. ; find the type of a file
  446. ; ~~~~~~~~~~~~~~~~~~~~~~~
  447.  
  448. dtype
  449.  use "a1:xtyp",f$:x=peek(ram2+32)
  450.  x$="???0TXT4PDA5BIN6ADB25AWP26ASP27SRC176OBJ177LIB178S16179RTL180EXE181"
  451.  x$=x$+"STR182RIF183NDA184CDA185SET186PNT192PIC193ANI194FNT200PAS239CMD240"
  452.  x$=x$+"COM245P16249BAS252VAR253REL254SYS255"
  453.  ty$="":y=instr(str$(x),x$):if y then ty$=mid$(x$,y-3,3):return
  454.  ty$="$"+chr$(48+x/16+((x/16)>9)*7)+chr$(48+x mod 16+((x mod 16)>9)*7)
  455.  return
  456.  
  457. ; set a file type
  458. ; ~~~~~~~~~~~~~~~
  459.  
  460. type
  461.  use "a1:xtyp",f$,x:return
  462.  
  463. ; return size of F$ in A
  464. ; ~~~~~~~~~~~~~~~~~~~~~~
  465.  
  466. size
  467.  open #1,f$:a=size(1)/2+1:close:return
  468.  
  469. ; see if file exists
  470. ; ~~~~~~~~~~~~~~~~~~
  471.  
  472. chkfil
  473.  open #1,f$:a=mark(1):return
  474.  
  475. ; :::::::::::::::::::
  476. ; special subroutines
  477. ; :::::::::::::::::::
  478.  
  479. ; get a file description
  480. ; ~~~~~~~~~~~~~~~~~~~~~~
  481.  
  482. edesc
  483.  print '
  484. Enter description: 'edit(3)' cols, [4K] max 
  485. [DONE] when finished, [.H] for help'
  486.  edit(1):return
  487.  
  488. ; convert to a valid ProDOS name
  489. ; ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  490.  
  491. ; shorten I$ to directory length
  492.  
  493. name
  494.  if len(i$)>15 then i$=left$(i$,15)
  495.  i$=i$+chr$(1)
  496.  
  497. ; make sure the first char is a letter
  498.  
  499. name.0
  500.  a=asc(left$(i$,1)):if a=1 pop:goto ret
  501.  if (a>64) and (a<91) then i$=left$(i$,len(i$)-1):goto name.1
  502.  if (a>96) and (a<123) then i$=left$(i$,len(i$)-1):goto name.1
  503.  i$=mid$(i$,2):goto name.0
  504.  
  505. ; remove symbols from the name
  506.  
  507. name.1
  508.  f$="":for x=1 to len(i$):a=asc(mid$(i$,x,1))
  509.  if (a>64) and (a<91) goto name.2
  510.  if (a>96) and (a<123) goto name.2
  511.  if (a>47) and (a<58) goto name.2
  512.  if a=46 goto name.2:else goto name.3
  513.  
  514. ; add a valid character
  515.  
  516. name.2
  517.  f$=f$+chr$(a)
  518.  
  519. ; if we dont have a name, return to the prompt
  520.  
  521. name.3
  522.  next:if f$="" pop:return
  523.  if len(f$)>15 then f$=left$(f$,15)
  524.  return
  525.  
  526. ; set file information
  527. ; ~~~~~~~~~~~~~~~~~~~~
  528.  
  529. sfile
  530.  byte(7)=byte(3):byte(8)=a mod 256:byte(9)=a/256
  531.  byte(10)=un mod 256:byte(11)=un/256:byte(16)=0
  532.  when$="x":if lb then byte(7)=255
  533.  return
  534.  
  535. ; ::::::::::::::
  536. ; error messages
  537. ; ::::::::::::::
  538.  
  539. nfile
  540.  print \\"XT:"chr$(7)" No such file...":goto ret
  541.  
  542. dfull
  543.  print \\"XT:"chr$(7)" Directory full...":goto ret
  544.